<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <button id="btn">serviceWorker install</button>
  <script>
      function renderDog() {
        const img = new Image()
        img.src = '/img/dog.svg';
        img.width = 200;
        img.style.display = 'block';
        document.body.appendChild(img);
      }

      
      document.getElementById('btn').addEventListener('click', () => {
        renderDog()
      })
  </script>
</body>
</html>